#include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;

signed main()
{
    int n,m;
    cin>>n>>m;
    int a[101];
    for(int i=0;i<n;i++){
        int j;
        for(j=0;j<n;j++)    cin>>a[j];
        sort(a+1,a+n);
        int sum = 0,num = 0,flag = 0;
        for(j=1;j<n;j++){
            if(a[j]<=m&&a[j]>=0&&!flag){
                flag = 1;
            }
            else if(a[j]<=m&&a[j]>=0&&flag){
                sum += a[j];
                num++;
            }
            if(a[j]>m)    break;
        }
        sum -= a[j-1];
        num--;
        cout<<round((sum*1.0/num+a[0])/2)<<'\n';
    }
    return 0;
}
